package com.lkd.controller;

import com.lkd.dto.VMDto;
import com.lkd.service.IVendingMachineService;
import com.lkd.vo.PageBean;
import com.lkd.vo.Result;
import com.lkd.vo.VMVo;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: VMController
 * Package: com.lkd.controller
 * Description:
 *
 * @Author zt
 * @Create 2025/10/16 17:47
 * @Version 1.0
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/vm-service/vm")
public class VMController {
    private final IVendingMachineService vendingMachineService;

    /**
     * 设备搜索
     * @param vmDto
     * @return
     */
    @GetMapping("/search")
    public Result search(VMDto vmDto){
        PageBean<VMVo> pageBean = vendingMachineService.search(vmDto);
        return Result.success(pageBean);
    }
}
